package com.umeox.quranplayer.db.model;

import androidx.room.Entity;
import androidx.room.Ignore;
import androidx.room.PrimaryKey;

/**
 * Created by Rambo 2021/11/19
 * Describe:
 */
@Entity(tableName = ChallengeRecord.TABLE_NAME)
public class ChallengeRecord {
    @Ignore
    public static final String TABLE_NAME = "challenge_record";

    @PrimaryKey(autoGenerate = true)
    public int _id;

    public int quranLearnId;

    public int chapterIndex;

    public String finishTime;

    public int duration;  //当前已完成的时间 单位秒

    public int targetDuration;//目标时长

    public int rewardValue;

    /**
     * 当日时间戳，没有时分秒
     */
    public int todayMillis;

    public String deadLine; //截止时间

    public boolean isComplete; //当前挑战是否已经完成

    /**
     * 是否已上传
     * 0 未上传，1.已上传
     */
    public boolean isUpload;


    @Override
    public String toString() {
        return "ChallengeRecord{" +
                "_id=" + _id +
                ", quranLearnId=" + quranLearnId +
                ", chapterIndex=" + chapterIndex +
                ", finishTime='" + finishTime + '\'' +
                ", duration=" + duration +
                ", targetDuration=" + targetDuration +
                ", rewardValue=" + rewardValue +
                ", todayMillis=" + todayMillis +
                ", deadLine='" + deadLine + '\'' +
                ", isComplete=" + isComplete +
                ", isUpload=" + isUpload +
                '}';
    }
}
